package xcmg.device.web.warehouse;

import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import xcmg.device.infra.BasicController;
import xcmg.device.infra.ErrorCode;
import xcmg.device.service.vo.warehouse.AbnormalInVO;
import xcmg.device.service.warehouse.AbnormalInDetailService;
import xcmg.device.service.warehouse.AbnormalInService;
import yb.ecp.fast.infra.annotation.FastMappingInfo;
import yb.ecp.fast.infra.infra.ActionResult;
import yb.ecp.fast.infra.infra.PageCommonVO;
import yb.ecp.fast.infra.infra.SearchCommonVO;

import java.math.BigDecimal;

@RestController
@RequestMapping("/abnormalInDetail")
public class AbnormalInDetailController extends BasicController{
    @Autowired
    private AbnormalInDetailService abnormalInDetailService;

    @RequestMapping(value = "/updatePrintNum",method = RequestMethod.POST)
    @ApiOperation(value = "根据非正常入库单号和零件号更新已打印条码数量")
    @FastMappingInfo(needLogin = true)
    public ActionResult warehouse(String abnormalNo, String materialsNo, BigDecimal printNum)throws Exception{
        return actionResult(abnormalInDetailService.updatePrintNum(abnormalNo, materialsNo, printNum));
    }
}
